package com.greensam.pixelengine.event.pixel;

import com.greensam.pixelengine.event.disruptor.TypeEventBusTemplate;
import org.springframework.stereotype.Component;

/**
 * @author Ma Chengrui
 * @since 2025/10/13 17:40
 */
@Component
public class PixelEventBus extends TypeEventBusTemplate<PixelEvent> {

    @Override
    protected PixelEvent newEvent() {
        return new PixelEvent();
    }

    @Override
    protected void copyEventData(PixelEvent target, PixelEvent source) {
        target.setEventTime(source.getEventTime());
        target.setData(source.getData());
        target.setEventType(source.getEventType());
    }
}
